<?php
defined('BASEPATH') OR exit('No direct script access allowed');

$config = array(
    'user/register'=>array(
        array(
            'field' => 'username',
            'label' => '用户名',
            'rules' => 'trim|required|callback_username_exists'
        ),
        array(
            'field' => 'password',
            'label' => '密码',
            'rules' => 'trim|required|min_length[4]|max_length[12]'
        ),
        array(
            'field' => 'passconf',
            'label' => '重复密码',
            'rules' => 'trim|required|matches[password]'
        ),
        array(
            'field' => 'email',
            'label' => 'Email',
            'rules' => 'trim|required|valid_email|callback_email_exists'
        )
    ),

    'user/login'=>array(
        array(
            'field' => 'username',
            'label' => '用户名',
            'rules' => 'trim|required|callback_username_check'
        ),
        array(
            'field' => 'password',
            'label' => '密码',
            'rules' => 'trim|required|callback_password_check'
        )
    )
);